package com.itheima.controller;
import com.itheima.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test {
    public static void main(String[] args) {
        //初始化spring
        ApplicationContext context=new ClassPathXmlApplicationContext("applicationContext.xml");

        //从spring
        UserService userServicelmpl =(UserService) context.getBean("userServicelmpl");
        userServicelmpl.query();

    }

}
